package com.woniuxy.purchasemanager.controller;

import com.woniuxy.commons.result.Result;
import com.woniuxy.purchasemanager.service.DemandGoods;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.Map;

/**
 * @Author:黄志超
 * @Todo:TODO
 * @DateTime:2022/4/26 17:50
 * @Component:蜗牛
 **/
@RestController
@RequestMapping("/need/DemandGoods")
public class DemandGoodsController {
    @Resource
    private DemandGoods demandGoods;

    @GetMapping("/list/{oddNumber}/{currentPage}/{pageSize}")
    public Result getList(@PathVariable String oddNumber ,@PathVariable Integer currentPage, @PathVariable Integer pageSize){
      Map<String,Object> map =  demandGoods.getList(oddNumber, currentPage, pageSize);
        return Result.ok(map);
    }
}
